<script setup>
import {ref} from "vue";
import {useMessage} from "../store/MessageStore";


const props = defineProps({
  customNav:{
    type:Boolean,
    default:false
  }
})

const messageStore = useMessage();
const msg_pop = messageStore.msg;

const msg = ref();

messageStore.$subscribe((mutation, state) => {
  if (!msg.value) {
    return
  }
  msg.value.open();
})
</script>

<template>
  <uni-popup ref="msg" type="message" :top-offset="72">
    <uni-popup-message :type="msg_pop.type" :message="msg_pop.msg" :duration="msg_pop.duration"></uni-popup-message>
  </uni-popup>
</template>

<style scoped lang="scss">
</style>
